Integrand size = 21, antiderivative size = 70 \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {2 \left (a^2+b^2\right ) \cos (c+d x) (b-a \tan (c+d x))}{3 d}-\frac {\cos ^3(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{3 d} \]
-2/3*(a^2+b^2)*cos(d*x+c)*(b-a*tan(d*x+c))/d-1/3*cos(d*x+c)^3*(b-a*tan(d*x +c))*(a+b*tan(d*x+c))^2/d
Time = 0.78 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.16 \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {-9 b \left (a^2+b^2\right ) \cos (c+d x)+\left (-3 a^2 b+b^3\right ) \cos (3 (c+d x))+2 a \left (5 a^2+3 b^2+\left (a^2-3 b^2\right ) \cos (2 (c+d x))\right ) \sin (c+d x)}{12 d} \]
(-9*b*(a^2 + b^2)*Cos[c + d*x] + (-3*a^2*b + b^3)*Cos[3*(c + d*x)] + 2*a*( 5*a^2 + 3*b^2 + (a^2 - 3*b^2)*Cos[2*(c + d*x)])*Sin[c + d*x])/(12*d)
Time = 0.51 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.17, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3991, 3042, 4159, 2009, 4857, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \tan (c+d x))^3}{\sec (c+d x)^3}dx\) |
\(\Big \downarrow \) 3991 |
\(\displaystyle \int \cos ^3(c+d x) \left (a^3+3 b^2 \tan ^2(c+d x) a\right )dx+\int \cos ^2(c+d x) \sin (c+d x) \left (\tan ^2(c+d x) b^3+3 a^2 b\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a^3+3 b^2 \tan (c+d x)^2 a}{\sec (c+d x)^3}dx+\int \frac {\sin (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )}{\sec (c+d x)^2}dx\) |
\(\Big \downarrow \) 4159 |
\(\displaystyle \int \frac {\sin (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )}{\sec (c+d x)^2}dx+\frac {\int \left (a^3-a \left (a^2-3 b^2\right ) \sin ^2(c+d x)\right )d\sin (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \int \frac {\sin (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )}{\sec (c+d x)^2}dx+\frac {a^3 \sin (c+d x)-\frac {1}{3} a \left (a^2-3 b^2\right ) \sin ^3(c+d x)}{d}\) |
\(\Big \downarrow \) 4857 |
\(\displaystyle \frac {a^3 \sin (c+d x)-\frac {1}{3} a \left (a^2-3 b^2\right ) \sin ^3(c+d x)}{d}-\frac {\int \left (\left (1-\cos ^2(c+d x)\right ) b^3+3 a^2 \cos ^2(c+d x) b\right )d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^3 \sin (c+d x)-\frac {1}{3} a \left (a^2-3 b^2\right ) \sin ^3(c+d x)}{d}-\frac {a^2 b \cos ^3(c+d x)-\frac {1}{3} b^3 \cos ^3(c+d x)+b^3 \cos (c+d x)}{d}\) |
-((b^3*Cos[c + d*x] + a^2*b*Cos[c + d*x]^3 - (b^3*Cos[c + d*x]^3)/3)/d) + (a^3*Sin[c + d*x] - (a*(a^2 - 3*b^2)*Sin[c + d*x]^3)/3)/d
3.6.41.3.1 Defintions of rubi rules used
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _), x_Symbol] :> Module[{k}, Int[Sec[e + f*x]^m*Sum[Binomial[n, 2*k]*a^(n - 2*k)*b^(2*k)*Tan[e + f*x]^(2*k), {k, 0, n/2}], x] + Int[Sec[e + f*x]^m*Tan [e + f*x]*Sum[Binomial[n, 2*k + 1]*a^(n - 2*k - 1)*b^(2*k + 1)*Tan[e + f*x] ^(2*k), {k, 0, (n - 1)/2}], x]] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_ ))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2 *x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFacto rs[Cos[c*(a + b*x)], x]}, Simp[-d/(b*c) Subst[Int[SubstFor[1, Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d], x] /; FunctionOfQ[Cos[c*(a + b* x)]/d, u, x]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Sin] || EqQ[F, sin])
Time = 10.37 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.07
method | result | size |
derivativedivides | \(\frac {-\frac {b^{3} \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}+a \,b^{2} \left (\sin ^{3}\left (d x +c \right )\right )-a^{2} b \left (\cos ^{3}\left (d x +c \right )\right )+\frac {a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(75\) |
default | \(\frac {-\frac {b^{3} \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}+a \,b^{2} \left (\sin ^{3}\left (d x +c \right )\right )-a^{2} b \left (\cos ^{3}\left (d x +c \right )\right )+\frac {a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(75\) |
risch | \(-\frac {3 b \cos \left (d x +c \right ) a^{2}}{4 d}-\frac {3 b^{3} \cos \left (d x +c \right )}{4 d}+\frac {3 a^{3} \sin \left (d x +c \right )}{4 d}+\frac {3 a \sin \left (d x +c \right ) b^{2}}{4 d}-\frac {b \cos \left (3 d x +3 c \right ) a^{2}}{4 d}+\frac {b^{3} \cos \left (3 d x +3 c \right )}{12 d}+\frac {a^{3} \sin \left (3 d x +3 c \right )}{12 d}-\frac {a \sin \left (3 d x +3 c \right ) b^{2}}{4 d}\) | \(130\) |
1/d*(-1/3*b^3*(2+sin(d*x+c)^2)*cos(d*x+c)+a*b^2*sin(d*x+c)^3-a^2*b*cos(d*x +c)^3+1/3*a^3*(2+cos(d*x+c)^2)*sin(d*x+c))
Time = 0.25 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.10 \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {3 \, b^{3} \cos \left (d x + c\right ) + {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{3} - {\left (2 \, a^{3} + 3 \, a b^{2} + {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{3 \, d} \]
-1/3*(3*b^3*cos(d*x + c) + (3*a^2*b - b^3)*cos(d*x + c)^3 - (2*a^3 + 3*a*b ^2 + (a^3 - 3*a*b^2)*cos(d*x + c)^2)*sin(d*x + c))/d
\[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \cos ^{3}{\left (c + d x \right )}\, dx \]
Time = 0.28 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.10 \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {3 \, a^{2} b \cos \left (d x + c\right )^{3} - 3 \, a b^{2} \sin \left (d x + c\right )^{3} + {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{3} - {\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} b^{3}}{3 \, d} \]
-1/3*(3*a^2*b*cos(d*x + c)^3 - 3*a*b^2*sin(d*x + c)^3 + (sin(d*x + c)^3 - 3*sin(d*x + c))*a^3 - (cos(d*x + c)^3 - 3*cos(d*x + c))*b^3)/d
Leaf count of result is larger than twice the leaf count of optimal. 24430 vs. \(2 (68) = 136\).
Time = 142.57 (sec) , antiderivative size = 24430, normalized size of antiderivative = 349.00 \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\text {Too large to display} \]
1/768*(72*pi*a^2*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan( 1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x )^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2* c)^2 + 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2*c)^6 - 105*pi*b^3*sgn(ta n(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan( 1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) - 1 )*tan(1/2*d*x)^6*tan(1/2*c)^6 + 72*pi*a^2*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^ 2 - 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 - 2*tan(1/ 2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2 *c)^6 - 105*pi*b^3*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan( 1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 - 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x )^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2* c)^2 - 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2*c)^6 - 72*pi*a^2*b*sgn(t an(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2*c)^6 + 105*pi* b^3*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/ 2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^6*tan(1/2*c)^6 + 72*pi*a^2*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)*tan(1/2*...
Time = 4.22 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.49 \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {\frac {\sin \left (c+d\,x\right )\,a^3\,{\cos \left (c+d\,x\right )}^2}{3}+\frac {2\,\sin \left (c+d\,x\right )\,a^3}{3}-a^2\,b\,{\cos \left (c+d\,x\right )}^3-\sin \left (c+d\,x\right )\,a\,b^2\,{\cos \left (c+d\,x\right )}^2+\sin \left (c+d\,x\right )\,a\,b^2+\frac {b^3\,{\cos \left (c+d\,x\right )}^3}{3}-b^3\,\cos \left (c+d\,x\right )}{d} \]